package close.mazegame;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.InputProcessor;

import close.mazegame.input.GamepadMap.Model;
import close.mazegame.input.MiscInput;
import close.mazegame.input.playerinput.PadPlayerController;
import close.mazegame.input.playerinput.PlayerInput;
import close.mazegame.input.uiinput.PadUIController;
import close.mazegame.input.uiinput.UIInput;

public class InputHandler {
	
	public static InputMultiplexer input;
	
	public static MiscInput miscInput;
	public static UIInput uiInput;
	public static PlayerInput playerInput;

	private InputHandler() {
	}
	
	public static void create() {
		input = new InputMultiplexer();
		Gdx.input.setInputProcessor(input);
		
		miscInput = new MiscInput();
		//uiInput = new KeyboardUIController();
		//playerInput = new KMPlayerController();
		uiInput = new PadUIController(Model.Xbox);
		playerInput = new PadPlayerController(Model.Xbox);
	}
	
	public static void reset() {
		uiInput.resetTypedKeys();
		playerInput.resetTypedKeys();
	}
	
	public static void addInputProcessor(InputProcessor ip) {
		input.addProcessor(ip);
	}
	
	public static void removeInputProcessor(InputProcessor ip) {
		input.removeProcessor(ip);
	}
}
